1. Field of the Invention
The present invention relates to image processing apparatuses, and more particularly, to an image processing apparatus using the error diffusion method.
2. Description of the Background Art
The error diffusion technique is conventionally known as the binarization method of furnishing both the gradation and resolution in an image processing apparatus. According to the error diffusion binarization technique, an error-corrected multi-valued pixel of 8 bits, for example, is binarized with the threshold value of Th=128. A binarization error is generated thereby, which is propagated to another pixel to preserve area gradation. A pseudo gradation representation of a conventional error diffusion technique will be described hereinafter.
FIG. 51 is a block diagram of an error diffusion unit 150 employed in a conventional image processing apparatus. Referring to FIG. 51, error diffusion unit 150 includes an error correction unit 151 for correcting a multi-valued pixel data f (x, y) represented by 8 bits per pixel (gradation of 256 levels), for example, according to error data e' (x, y) that will be described afterwards, a binarization unit 152 for binarizing error-corrected image data f' (x, y) with a predetermined binarized threshold value of Th=128, an error calculation unit 153 for calculating the error of binarized binary data g (x, y) and error corrected image data f' (x, y), an error storage line memory 154 for storing three lines of the calculated error, and a peripheral error weighting filter 155 connected to error storage line memory 154 for applying the weight of peripheral pixels to a pixel of interest.
Here, x, y are variables indicating the address of a pixel of image data, where the value of x indicates an address in the subscanning direction and the value of y indicates an address in the main scanning direction. Therefore, f (x, y) indicates a value of the image data of a pixel of address (x, y).
The operation of error diffusion unit 150 will be described hereinafter. Error correction unit 151 provides image data f' (x, y) that is error-corrected with error data e' (x, y) to binarization unit 152. Image data f' (x, y) is binarized by a fixed binary threshold value of Th=128 to result in binary data g (x, y) of either 0 or 1. Error calculation unit 153 provides a binarized error e (x, y) which is calculated as set forth in the following.
(i) When error-corrected image data f' (x, y).gtoreq. binarized threshold value Th (128): PA1 (ii) Otherwise:
Binary data g (x, y)=1 (black) PA2 Error e (x, y)=f' (x, y)-255 PA2 Binary data g (x, y)=0 (white) PA2 Error e (x, y)=f' (x, y)-0
Three lines of error e (x, y) calculated as above are stored by error storage line memory 154. Using peripheral error weighting filter 155, a weight average error data e' (x, y) for diffusing error e (x, y) to another pixel is calculated. Weight coefficient k (i, j) is greater as a function of a closer location to the pixel of interest, and has a total sum of 1. Weight coefficient k (i, j) is shown in FIG. 52.
FIG. 53 shows binarization error e (x, y). When error correction data f' (x, y) is greater than the threshold value of Th=128 (indicated by f1 (x, y) in FIG. 53), binarization error e (x, y) is represented as a minus error as shown in e1 (x, y) in FIG. 53. When error correction data f' (x, y) is smaller than the binarization threshold value of Th=128 (indicated by f2 (x, y) in FIG. 53), binarization error e (x, y) is represented as a plus error as shown in e2 (x, y).
Weight average error data e' (x, y) is calculated by the following equation (1). ##EQU1##
The calculated error data e' (x, y) is provided to error correction unit 151, whereby error is sequentially propagated.
According to the error diffusion technique of a conventional image processing apparatus, a particular stripe pattern is generated in the binarization pattern in images such as computer graphics and photographs that have very extremely small dispersion of pixels since the generation of a similar error is repeated periodically. An example of a binarization pattern when an original image of a picture with a dispersion of 0 (high frequency component of 0 with only DC component) is shown in FIG. 54. The continuous streak of pixels in a diagonal direction shown in FIG. 54 is the above-mentioned stripe pattern. Since a conventional error diffusion unit includes a feedback loop as shown in FIG. 51, high speed operation is more difficult to implement than a dither process. There is also a problem that the circuit complexity is increased more than a dither process since an error storage line memory is required.
In an image of an original such as a document written by a pencil which includes a low density thin stroke of an original density (OD)=0.4 (32.about.64/255 gradation levels in density data value) with a line width of 125 microns (approximately several dots in 400 dpi) on a white base (0/255 gradation level in density data value), the thin stroke segment has an intermittent appearance since error propagation is too slow according to the conventional error diffusion technique. This problem will be described in detail hereinafter.
FIG. 55a shows multi-valued image f (x, y) applied to error correction unit 151, and FIG. 55b shows error data e' (x, y). Attention is focused on image data f (x, y) suddenly switched to a low density thin stroke (density data value of 32) from a white base (density data value of 0). Image data f (x, y) of the pixel of interest is 32, whereas image data f (x, y) of the pixels preceding the pixel of interest is a white base (density data value of 0). Error e' (x, y) which is to be corrected on the basis of image data f (x, y) of the pixel of interest is 0. Therefore, error propagation for representing low density thin stroke region f (x, y) in a pseudo gradation is initiated with error data e' (x+1, y) as the origin (end). However, binarization error e' (x, y) of low density thin stroke f (x, y) takes a small value of +32. Therefore, a propagation distance of several dots in both the x axis direction and the y axis direction is required to reach the binarization threshold value of Th128 to have a black dot recorded.
More specifically, error correction data f' (x, y) in the case where the pixel abruptly changes from a white base to a low density thin stroke is represented by the following equation. EQU f'(x, y)=f(x, y)+e'(x, y)=32+0=32
When the width of the low density thin stroke region is only several dots, this error propagation will not be in time to record a black dot. As a result, the thin stroke is shown in an intermittent manner. FIG. 56 shows samples of printed characters of several sizes by a conventional image processing apparatus. Referring to the sample of size 10.5, it is appreciated that the left side portion of a thin stroke is missing in the horizontal line direction.
Thus, in an image processing apparatus employing a conventional error calculation unit 150, there was a problem that a thin stroke segment has an intermittent appearance when the width of the low density thin stroke portion is only several dots.